1. Technical Field
The present invention relates to a system and a method for testing a chip, and more particularly to a system and a method for testing a magnetic stripe decoding chip.
2. Related Art
FIG. 1 is a diagram of a relation between a magnetic stripe and a decoding signal in the prior art. Generally, a magnetic stripe 101a in a debit or credit card is configured with specifically encoded binary data corresponding to the distribution of magnetic poles on the magnetic stripe. The magnetic stripe may record information by using an encoding technique such as frequency modulation (FM), phase modulation (PM) or double-frequency coherent-phase (F/2F, also known as Aiken Biphase). FIG. 1 shows an example of magnetic pole distribution when the double-frequency coherent-phase encoding technique (F/2F, also known as Aiken Biphase), is used for encoding. A corresponding magnetic code signal 102a can be generated by sensing the magnetic pole distribution (including a plurality of north magnetic poles N and a plurality of south magnetic poles S), of the magnetic stripe 101a. 
As shown in FIG. 1, an F/2F encoded signal 103a is a clock signal with alternating high and low levels, and is defined as 0 or 1 according to the duration of high and low levels. Consequently, the F/2F encoded signal 103a may be decoded into a binary data sequence 104a according to peak-to-peak periods T of the magnetic code signal 102a. 
FIG. 2 is a schematic view of a magnetic stripe reading circuit 110a in the prior art. As shown in FIG. 2, a magnetic head 111a can sense movement of a magnetic stripe in a magnetic card, and generate the magnetic code signal 102a shown in FIG. 1. A signal processing circuit 112a converts the magnetic code signal 102a into an F/2F encoded signal 113a. A decoding chip 114a receives the F/2F encoded signal 113a, and decodes the signal into the binary data sequence 104a shown in FIG. 1.
As shown in FIG. 2, a differential amplifier is disposed at a front end of the signal processing circuit 112a, and configured to receive and amplify a differential signal (the magnetic code signal 102a), output by the magnetic head 111a, so that a comparator at the back end uses a level voltage Vbias as a reference to detect a waveform and capture wave peaks, and further converts the differential signal into the F/2F encoded signal 113a. 
However, before shipment the manufacturer of the decoding chip 114a is required to inspect the quality of the decoding chip 114a. In an existing testing method, the architecture of the magnetic stripe reading circuit 110a is adopted as a testing circuit, and the decoding chip 114a is tested by means of manual swiping, so as to judge whether the decoding chip 114a can correctly read information recorded by the magnetic stripe.
However, such a testing method incurs the following problems:
1. To test the reliability of the decoding chip 114a, the decoding chip 114a is required to be tested for many times with different swipe speeds and swipe directions, which is labor and time consuming.
2. The swipe speed cannot be accurately controlled manually, which easily leads to inconsistency between test conditions and practical operations, resulting in an incomplete test item.